Why am I getting an AttributeError for 'pd.series' in my Python code